<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/tomato.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/tomato-16.png">
  <link rel="mask-icon" href="/blog/images/logo.svg" color="#222">

<link rel="stylesheet" href="/blog/css/main.css">


<link rel="stylesheet" href="/blog/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"linfanqie.gitee.io","root":"/blog/","scheme":"Mist","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":true,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="介绍：本文主要讲在部署Hexo和Gitee时候遇到的所有问题以及解决方案">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo遇到的问题及解决办法">
<meta property="og:url" content="https://linfanqie.gitee.io/2021/03/03/Hexo%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/index.html">
<meta property="og:site_name" content="林番茄的Blog">
<meta property="og:description" content="介绍：本文主要讲在部署Hexo和Gitee时候遇到的所有问题以及解决方案">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://linfanqie.gitee.io/blog/2021/03/03/Hexo%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84.jpg">
<meta property="article:published_time" content="2021-03-03T06:32:44.000Z">
<meta property="article:modified_time" content="2021-04-01T03:05:59.935Z">
<meta property="article:author" content="林番茄">
<meta property="article:tag" content="Hexo系列">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://linfanqie.gitee.io/blog/2021/03/03/Hexo%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84.jpg">

<link rel="canonical" href="https://linfanqie.gitee.io/2021/03/03/Hexo%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Hexo遇到的问题及解决办法 | 林番茄的Blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/blog/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">林番茄的Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">世界那么大，总得慢慢看。</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/blog/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/blog/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/blog/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://linfanqie.gitee.io/2021/03/03/Hexo%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/blog/images/cate.jpg">
      <meta itemprop="name" content="林番茄">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="林番茄的Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Hexo遇到的问题及解决办法
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-03-03 14:32:44" itemprop="dateCreated datePublished" datetime="2021-03-03T14:32:44+08:00">2021-03-03</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-04-01 11:05:59" itemprop="dateModified" datetime="2021-04-01T11:05:59+08:00">2021-04-01</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/Hexo%E7%B3%BB%E5%88%97/" itemprop="url" rel="index"><span itemprop="name">Hexo系列</span></a>
                </span>
            </span>

          <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="far fa-file-word"></i>
              </span>
                <span class="post-meta-item-text">本文字数：</span>
              <span>668</span>
            </span>
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="far fa-clock"></i>
              </span>
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              <span>1 分钟</span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p><strong>介绍</strong>：本文主要讲在部署Hexo和Gitee时候遇到的所有问题以及解决方案</p>
<span id="more"></span>
<h4 id="hexo-d-部署至Gitee时候报错"><a href="#hexo-d-部署至Gitee时候报错" class="headerlink" title="hexo d 部署至Gitee时候报错"></a>hexo d 部署至Gitee时候报错</h4><blockquote>
<p>ERROR Deployer not found: git （部署程序没有找到git）<br>解决办法：</p>
<figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">执行：npm install hexo-deployer-git <span class="params">--save</span> </span><br></pre></td></tr></table></figure>
</blockquote>
<h4 id="部署Gitee或本地运行时候图片没有生效"><a href="#部署Gitee或本地运行时候图片没有生效" class="headerlink" title="部署Gitee或本地运行时候图片没有生效"></a>部署Gitee或本地运行时候图片没有生效</h4><blockquote>
<p>打开根目录的_config.yml文件，将 post_asset_folder:false改为true<br>更改之后效果：新建文章时候，将自动生成与文章同名的文件夹，这个文件夹存放当前所用图片的地方，例如<br>新建 hexo n “hexo图片不显示问题” ,产生结构如下</p>
<blockquote>
<p>hexo图片不显示问题<br>|——test.png<br>|——test1.png<br>hexo图片不显示问题.md</p>
</blockquote>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">安装: npm install https:<span class="regexp">//gi</span>thub.com<span class="regexp">/7ym0n/</span>hexo-asset-image.git</span><br></pre></td></tr></table></figure>
<p>安装成功之后在”hexo图片不显示问题.md”中调用语法为：<br><code>&#123;% asset_img test.png This is a test.png %&#125;</code><br>test.png为图片名称，可直接输入图片名称即可，无需输入路径<br>运行：</p>
<figure class="highlight xl"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="title">hexo</span> clean -&gt;</span> <span class="function"><span class="title">hexo</span> g -&gt;</span> hexo s <span class="built_in">or</span> hexo d </span><br></pre></td></tr></table></figure>
<p>可直接在本地运行是否显示，之后直接上传至网站<br>目录结构：</p>
<img src="/blog/2021/03/03/Hexo%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84.jpg" class="">
</blockquote>
<h4 id="部署Gitee时候样式没有生效"><a href="#部署Gitee时候样式没有生效" class="headerlink" title="部署Gitee时候样式没有生效"></a>部署Gitee时候样式没有生效</h4><blockquote>
<p>1.检查根目录下的_config.yml文件，前往”网站设置”位置处查看是否设置正确（详情前往Hexo搭建个人博客（二）– 网站设置）<br>2.进入网站强制刷新：shift+F5 重新刷新查看页面</p>
</blockquote>

    </div>

    
    
    
        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>林番茄
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="https://linfanqie.gitee.io/2021/03/03/Hexo%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E5%8F%8A%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95/" title="Hexo遇到的问题及解决办法">https://linfanqie.gitee.io/2021/03/03/Hexo遇到的问题及解决办法/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>


      <div>
        
          <div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-paw"></i>感谢您的阅读-------------</div>
    
</div>

        
      </div>

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/blog/tags/Hexo%E7%B3%BB%E5%88%97/" rel="tag"># Hexo系列</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/blog/2021/03/02/Hexo%E7%B3%BB%E5%88%97%EF%BC%88%E4%B8%89%EF%BC%89/" rel="prev" title="Hexo搭建个人博客（三）">
      <i class="fa fa-chevron-left"></i> Hexo搭建个人博客（三）
    </a></div>
      <div class="post-nav-item">
    <a href="/blog/2021/03/25/hexo%E4%B8%BB%E9%A2%98%E9%85%8D%E7%BD%AE/" rel="next" title="Hexo主题配置">
      Hexo主题配置 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-4"><a class="nav-link" href="#hexo-d-%E9%83%A8%E7%BD%B2%E8%87%B3Gitee%E6%97%B6%E5%80%99%E6%8A%A5%E9%94%99"><span class="nav-number">1.</span> <span class="nav-text">hexo d 部署至Gitee时候报错</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E9%83%A8%E7%BD%B2Gitee%E6%88%96%E6%9C%AC%E5%9C%B0%E8%BF%90%E8%A1%8C%E6%97%B6%E5%80%99%E5%9B%BE%E7%89%87%E6%B2%A1%E6%9C%89%E7%94%9F%E6%95%88"><span class="nav-number">2.</span> <span class="nav-text">部署Gitee或本地运行时候图片没有生效</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E9%83%A8%E7%BD%B2Gitee%E6%97%B6%E5%80%99%E6%A0%B7%E5%BC%8F%E6%B2%A1%E6%9C%89%E7%94%9F%E6%95%88"><span class="nav-number">3.</span> <span class="nav-text">部署Gitee时候样式没有生效</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="林番茄"
      src="/blog/images/cate.jpg">
  <p class="site-author-name" itemprop="name">林番茄</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/blog/archives/">
        
          <span class="site-state-item-count">5</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/blog/categories/">
          
        <span class="site-state-item-count">1</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">1</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>
  <div class="cc-license motion-element" itemprop="license">
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" rel="noopener" target="_blank"><img src="/blog/images/cc-by-nc-sa.svg" alt="Creative Commons"></a>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-star"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">林番茄</span>
</div>
<script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
  <!--
    <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://mist.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
    </div>
    -->
    <div class="powered-by">
    <i class="fa fa-user-md"></i><span id="busuanzi_container_site_uv">
      本站访客数:<span id="busuanzi_value_site_pv"></span>
    </span>
    </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/blog/lib/anime.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script>
  <script src="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js"></script>
  <script src="/blog/lib/velocity/velocity.min.js"></script>
  <script src="/blog/lib/velocity/velocity.ui.min.js"></script>

<script src="/blog/js/utils.js"></script>

<script src="/blog/js/motion.js"></script>


<script src="/blog/js/schemes/muse.js"></script>


<script src="/blog/js/next-boot.js"></script>




  















  

  

<script src="/blog/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","model":{"jsonPath":"/blog/live2dw/assets/hijiki.model.json"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":true},"log":false,"tagMode":false});</script></body>
</html>
